3.233 \(\int \frac {\sqrt {\cos (c+d x)}}{\sqrt {1+\cos (c+d x)}} \, dx\)

Optimal. Leaf size=54 \[ \frac {2 \sin ^{-1}\left (\frac {\sin (c+d x)}{\sqrt {\cos (c+d x)+1}}\right )}{d}-\frac {\sqrt {2} \sin ^{-1}\left (\frac {\sin (c+d x)}{\cos (c+d x)+1}\right )}{d} \]

[Out]

2*arcsin(sin(d*x+c)/(1+cos(d*x+c))^(1/2))/d-arcsin(sin(d*x+c)/(1+cos(d*x+c)))*2^(1/2)/d

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {2777, 2774, 216, 2781} \[ \frac {2 \sin ^{-1}\left (\frac {\sin (c+d x)}{\sqrt {\cos (c+d x)+1}}\right )}{d}-\frac {\sqrt {2} \sin ^{-1}\left (\frac {\sin (c+d x)}{\cos (c+d x)+1}\right )}{d} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[Cos[c + d*x]]/Sqrt[1 + Cos[c + d*x]],x]

[Out]

-((Sqrt[2]*ArcSin[Sin[c + d*x]/(1 + Cos[c + d*x])])/d) + (2*ArcSin[Sin[c + d*x]/Sqrt[1 + Cos[c + d*x]]])/d

Rule 216

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[(Rt[-b, 2]*x)/Sqrt[a]]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 2774

Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(d_.)*sin[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[-2/f, Su
bst[Int[1/Sqrt[1 - x^2/a], x], x, (b*Cos[e + f*x])/Sqrt[a + b*Sin[e + f*x]]], x] /; FreeQ[{a, b, d, e, f}, x]
&& EqQ[a^2 - b^2, 0] && EqQ[d, a/b]

Rule 2777

Int[Sqrt[(c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[
d/b, Int[Sqrt[a + b*Sin[e + f*x]]/Sqrt[c + d*Sin[e + f*x]], x], x] + Dist[(b*c - a*d)/b, Int[1/(Sqrt[a + b*Sin
[e + f*x]]*Sqrt[c + d*Sin[e + f*x]]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 -
 b^2, 0] && NeQ[c^2 - d^2, 0]

Rule 2781

Int[1/(Sqrt[(d_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]), x_Symbol] :> -Dist[Sqr
t[2]/(Sqrt[a]*f), Subst[Int[1/Sqrt[1 - x^2], x], x, (b*Cos[e + f*x])/(a + b*Sin[e + f*x])], x] /; FreeQ[{a, b,
 d, e, f}, x] && EqQ[a^2 - b^2, 0] && EqQ[d, a/b] && GtQ[a, 0]

Rubi steps

\begin {align*} \int \frac {\sqrt {\cos (c+d x)}}{\sqrt {1+\cos (c+d x)}} \, dx &=-\int \frac {1}{\sqrt {\cos (c+d x)} \sqrt {1+\cos (c+d x)}} \, dx+\int \frac {\sqrt {1+\cos (c+d x)}}{\sqrt {\cos (c+d x)}} \, dx\\ &=-\frac {2 \operatorname {Subst}\left (\int \frac {1}{\sqrt {1-x^2}} \, dx,x,-\frac {\sin (c+d x)}{\sqrt {1+\cos (c+d x)}}\right )}{d}+\frac {\sqrt {2} \operatorname {Subst}\left (\int \frac {1}{\sqrt {1-x^2}} \, dx,x,-\frac {\sin (c+d x)}{1+\cos (c+d x)}\right )}{d}\\ &=-\frac {\sqrt {2} \sin ^{-1}\left (\frac {\sin (c+d x)}{1+\cos (c+d x)}\right )}{d}+\frac {2 \sin ^{-1}\left (\frac {\sin (c+d x)}{\sqrt {1+\cos (c+d x)}}\right )}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.26, size = 135, normalized size = 2.50 \[ -\frac {i \left (1+e^{i (c+d x)}\right ) \sqrt {\frac {\cos (c+d x)}{\cos (c+d x)+1}} \left (\sinh ^{-1}\left (e^{i (c+d x)}\right )-\sqrt {2} \tanh ^{-1}\left (\frac {-1+e^{i (c+d x)}}{\sqrt {2} \sqrt {1+e^{2 i (c+d x)}}}\right )-\tanh ^{-1}\left (\sqrt {1+e^{2 i (c+d x)}}\right )\right )}{d \sqrt {1+e^{2 i (c+d x)}}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[Cos[c + d*x]]/Sqrt[1 + Cos[c + d*x]],x]

[Out]

((-I)*(1 + E^(I*(c + d*x)))*(ArcSinh[E^(I*(c + d*x))] - Sqrt[2]*ArcTanh[(-1 + E^(I*(c + d*x)))/(Sqrt[2]*Sqrt[1
 + E^((2*I)*(c + d*x))])] - ArcTanh[Sqrt[1 + E^((2*I)*(c + d*x))]])*Sqrt[Cos[c + d*x]/(1 + Cos[c + d*x])])/(d*
Sqrt[1 + E^((2*I)*(c + d*x))])

________________________________________________________________________________________

fricas [A]  time = 0.88, size = 70, normalized size = 1.30 \[ \frac {\sqrt {2} \arctan \left (\frac {\sqrt {2} \sqrt {\cos \left (d x + c\right ) + 1} \sqrt {\cos \left (d x + c\right )}}{\sin \left (d x + c\right )}\right ) - 2 \, \arctan \left (\frac {\sqrt {\cos \left (d x + c\right ) + 1} \sqrt {\cos \left (d x + c\right )}}{\sin \left (d x + c\right )}\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^(1/2)/(1+cos(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

(sqrt(2)*arctan(sqrt(2)*sqrt(cos(d*x + c) + 1)*sqrt(cos(d*x + c))/sin(d*x + c)) - 2*arctan(sqrt(cos(d*x + c) +
 1)*sqrt(cos(d*x + c))/sin(d*x + c)))/d

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sqrt {\cos \left (d x + c\right )}}{\sqrt {\cos \left (d x + c\right ) + 1}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^(1/2)/(1+cos(d*x+c))^(1/2),x, algorithm="giac")

[Out]

integrate(sqrt(cos(d*x + c))/sqrt(cos(d*x + c) + 1), x)

________________________________________________________________________________________

maple [B]  time = 0.14, size = 124, normalized size = 2.30 \[ -\frac {\sqrt {2+2 \cos \left (d x +c \right )}\, \left (\sqrt {\cos }\left (d x +c \right )\right ) \left (-1+\cos \left (d x +c \right )\right ) \left (\sqrt {2}\, \arcsin \left (\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right )+2 \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}{\cos \left (d x +c \right )}\right )\right ) \sqrt {2}}{2 d \sin \left (d x +c \right )^{2} \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^(1/2)/(1+cos(d*x+c))^(1/2),x)

[Out]

-1/2/d*(2+2*cos(d*x+c))^(1/2)*cos(d*x+c)^(1/2)*(-1+cos(d*x+c))*(2^(1/2)*arcsin((-1+cos(d*x+c))/sin(d*x+c))+2*a
rctan(sin(d*x+c)*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)/cos(d*x+c)))/sin(d*x+c)^2/(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)
*2^(1/2)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^(1/2)/(1+cos(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: sign: argument cannot be imaginary
; found %i

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {\sqrt {\cos \left (c+d\,x\right )}}{\sqrt {\cos \left (c+d\,x\right )+1}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^(1/2)/(cos(c + d*x) + 1)^(1/2),x)

[Out]

int(cos(c + d*x)^(1/2)/(cos(c + d*x) + 1)^(1/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sqrt {\cos {\left (c + d x \right )}}}{\sqrt {\cos {\left (c + d x \right )} + 1}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**(1/2)/(1+cos(d*x+c))**(1/2),x)

[Out]

Integral(sqrt(cos(c + d*x))/sqrt(cos(c + d*x) + 1), x)

________________________________________________________________________________________